expandcollaps

dhtmlXGridObject object API

addRow(...) [Professional]
add new row to treeGrid

File required:dhtmlxtreegrid.js
addRow(new_id, text, ind)
add row to the grid

File required:dhtmlxgrid.js
  • new_id - row ID, must be unique
  • text - row values, may be a comma separated list or an array
  • ind - index of new row, optional, row added to the last position by default
  • addRowFromClipboard(...) [Professional]
    add new row from clipboard
    Topic(s):
    File required:dhtmlxgrid_nxml.js
    adjustColumnSize(cInd, complex)
    autosize column to max content size

    File required:dhtmlxgrid.js
  • cInd - index of column
  • attachFooter(...) [Professional]
    attach additional line to footer

    File required:dhtmlxgrid.js
    attachHeader(values, style, _type)
    attach additional line to header

    File required:dhtmlxgrid.js
  • values - array of header titles
  • style - array of styles, optional
  • _type - reserved
  • attachToObject(obj)
    attach grid to some object in DOM
    Topic(s): overal control;
    File required:dhtmlxgrid.js
  • obj - object to attach to
  • cellById(row_id, col)
    gets dhtmlXGridCellObject object (if no arguments then gets dhtmlXGridCellObject object of currently selected cell)
    Topic(s):
    File required:dhtmlxgrid.js
  • row_id - row id
  • col - column index

  • Returns:dhtmlXGridCellObject object (see its methods below)
    cellByIndex(row_index, col)
    gets dhtmlXGridCellObject object
    Topic(s):
    File required:dhtmlxgrid.js
  • row_index - row index
  • col - column index

  • Returns:dhtmlXGridCellObject object (see its methods below)
    cellToClipboard(...) [Professional]
    copy value of cell to clipboard
    Topic(s):
    File required:dhtmlxgrid_nxml.js
    cells(row_id, col)
    gets dhtmlXGridCellObject object (if no arguments then gets dhtmlXGridCellObject object of currently selected cell)
    Topic(s):
    File required:dhtmlxgrid.js
  • row_id - row id
  • col - column index

  • Returns:dhtmlXGridCellObject object (use it to get/set value to cell etc.)
    cells2(row_index, col)
    gets dhtmlXGridCellObject object
    Topic(s):
    File required:dhtmlxgrid.js
  • row_index - row index
  • col - column index

  • Returns:dhtmlXGridCellObject object (see its methods below)
    changePage(...) [Professional]
    change current page in grid
    Topic(s):
    File required:dhtmlxgrid_pgn.js
    changePageRelative(...) [Professional]
    change current page in grid
    Topic(s):
    File required:dhtmlxgrid_pgn.js
    changeRowId(oldRowId, newRowId)
    changes id of the row to the new one
    Topic(s):
    File required:dhtmlxgrid.js
  • oldRowId - row id to change
  • newRowId - row id to set
  • clearAll(header)
    deletes all rows in grid
    Topic(s): overal control; treegrid;
    File required:dhtmlxgrid.js
  • header - (boolean) enable/disable cleaning header
  • clearAndLoad()
    clears existing grid state and load new XML

    File required:dhtmlxgrid.js
    clearChangedState(...) [Professional]
    clear wasChanged state for all cells in grid
    Topic(s):
    File required:dhtmlxgrid.js
    clearConfigCookie(...) [Professional]
    clear cookie with grid config details
    Topic(s):
    File required:dhtmlxgrid_ssc.js
    clearSelection()
    removes selection from the grid
    Topic(s): treegrid;
    File required:dhtmlxgrid.js
    closeItem(...) [Professional]
    collapse row
    Topic(s):
    File required:dhtmlxtreegrid.js
    collapseAll(...) [Professional]
    collapse all tree structure
    Topic(s):
    File required:dhtmlxtreegrid.js
    collapseAllGroups(...) [Professional]
    collapse all groups

    File required:dhtmlxgrid_group.js
    collapseGroup(...) [Professional]
    collapse group of rows

    File required:dhtmlxgrid_group.js
    collectTreeValues(...) [Professional]
    get all possible values in column
    Topic(s):
    File required:dhtmlxtreegrid_filter.js
    Returns:{array} array of all possible values in column
    collectValues(...) [Professional]
    get all possible values in column
    Topic(s):
    File required:dhtmlxgrid_filter.js
    Returns:{array} array of all possible values in column
    copyBlockToClipboard()
    copy content of block selection into clipboard in csv format (delimiter as set for csv serialization)
    Topic(s):
    File required:dhtmlxgrid_selection.js
    copyRowContent(from_row_id, to_row_id)
    copies row content to another existing row
    Topic(s): data manipulation;
    File required:dhtmlxgrid.js
  • from_row_id - id of the row to copy content from
  • to_row_id - id of the row to copy content to
  • deleteChildItems(...) [Professional]
    delete all childs of row in question
    Topic(s):
    File required:dhtmlxtreegrid.js
    deleteColumn(...) [Professional]
    delete column
    Topic(s):
    File required:dhtmlxgrid_mcol.js
    deleteRow(row_id, node)
    delete row from the grid

    File required:dhtmlxgrid.js
  • row_id - row ID
  • deleteSelectedRows()
    deletes selected row(s)
    Topic(s):
    File required:dhtmlxgrid.js
    destructor()
    destructor, removes grid and cleans used memory
    Topic(s):
    File required:dhtmlxgrid.js
    detachFooter(index)
    remove footer line from grid (opposite to attachFooter)

    File required:dhtmlxgrid.js
  • values - array of header titles
  • detachHeader(index, hdr)
    remove header line from grid (opposite to attachHeader)

    File required:dhtmlxgrid.js
  • index - index of row to be removed ( zero based )
  • hdr - header object (optional)
  • disableUndoRedo(...) [Professional]
    disable Undo/Redo functionality in grid

    File required:dhtmlxgrid_undo.js
    doRedo(...) [Professional]
    ReDo

    File required:dhtmlxgrid_undo.js
    doUndo(...) [Professional]
    UnDo

    File required:dhtmlxgrid_undo.js
    doesRowExist(row_id)
    determines if row with specified id exists
    Topic(s): overal control;
    File required:dhtmlxgrid.js
  • row_id - row id

  • Returns:true if exists, false otherwise
    editCell()
    creates Editor object and switch cell to edit mode if allowed
    Topic(s):
    File required:dhtmlxgrid.js
    editStop(mode)
    retuns value from editor(if presents) to cell and closes editor
    Topic(s):
    File required:dhtmlxgrid.js
    enableAlterCss(cssE, cssU, perLevel, levelUnique)
    set even/odd css styles
    Topic(s): appearence control;
    File required:dhtmlxgrid.js
  • cssE - name of css class for even rows
  • cssU - name of css class for odd rows
  • perLevel - true/false - mark rows not by order, but by level in treegrid
  • levelUnique - true/false - creates additional unique css class based on row level
  • enableAutoHeight(mode, maxHeight, countFullHeight)
    enable autoheight of grid
    Topic(s):
    File required:dhtmlxgrid.js
  • mode - true/false
  • maxHeight - maximum height before scrolling appears (no limit by default)
  • countFullHeight - control the usage of maxHeight parameter - when set to true all grid height included in max height calculation, if false then only data part (no header) of grid included in calcualation (false by default)
  • enableAutoHiddenColumnsSaving(...) [Professional]
    enable automatic saving column state ( hidden | shown )
    Topic(s):
    File required:dhtmlxgrid_ssc.js
    enableAutoSaving(...) [Professional]
    enable automatic saving of all possible params
    Topic(s):
    File required:dhtmlxgrid_ssc.js
    enableAutoSizeSaving(...) [Professional]
    enable automatic size saving to cookie
    Topic(s):
    File required:dhtmlxgrid_ssc.js
    enableAutoWidth(mode, max_limit, min_limit)
    changes grid's container size on the fly to fit total width of grid columns

    File required:dhtmlxgrid.js
  • mode - truse/false - enable / disable
  • max_limit - max allowed width, not limited by default
  • min_limit - min allowed width, not limited by default
  • enableBlockSelection(mode)
    enables block selection mode in grid
    Topic(s):
    File required:dhtmlxgrid_selection.js
    enableCSVAutoID(...) [Professional]
    enable mode, where ID for rows loaded from CSV autogenerated
    Topic(s):
    File required:dhtmlxgrid_nxml.js
    enableCSVHeader(...) [Professional]
    enable recognizing first row in CSV as header
    Topic(s):
    File required:dhtmlxgrid_nxml.js
    enableCellIds(mode)
    enable/disable unique id for cells (id will be automaticaly created using the following template: "c_[RowId]_[colIndex]")
    Topic(s):
    File required:dhtmlxgrid.js
  • mode - true/false - enable/disable
  • enableColSpan(...) [Professional]
    enable/disable colspan support

    File required:dhtmlxgrid.js
    enableColumnMove(...) [Professional]
    enable move column functionality
    Topic(s):
    File required:dhtmlxgrid_mcol.js
    enableContextMenu(menu)
    enable/disable context menu
    Topic(s):
    File required:dhtmlxgrid.js
  • dhtmlxMenu object, if null - context menu will be disabled
  • enableDistributedParsing(...) [Professional]
    enable/disable distributed parsing (rows paresed portion by portion with some timeout)

    File required:dhtmlxgrid.js
    enableDragAndDrop(mode)
    enable/disable drag-and-drop
    Topic(s):
    File required:dhtmlxgrid_drag.js
  • mode - enabled/disabled [ can be true/false/temporary_disabled - last value mean that tree can be D-n-D can be switched to true later ]
  • enableDragOrder(mode)
    switch to mode when draged item, droped in target location in same order as they was in source grid
    Topic(s):
    File required:dhtmlxgrid_drag.js
  • mode - true/false to enable/disable mode
  • enableEditEvents(click, dblclick, f2Key)
    enable/disable events which fire excell editing, mutual exclusive with enableLightMouseNavigation

    File required:dhtmlxgrid.js
  • click - true/false - enable/disable editing by single click
  • dblclick - true/false - enable/disable editing by double click
  • f2Key - enable/disable editing by pressing F2 key
  • enableEditTabOnly(mode)
    enables/disables mode when readonly cell is not available with tab

    File required:dhtmlxgrid.js
  • mode - (boolean) true/false
  • enableHeaderImages(fl)
    specify if values passed to Header are images file names
    Topic(s): colums control;
    File required:dhtmlxgrid.js
  • fl - true to treat column header values as image names
  • enableHeaderMenu(...) [Professional]
    enable pop up menu which allows hidding/showing columns

    File required:dhtmlxgrid_hmenu.js
    enableKeyboardSupport(mode)
    enable/disable hot keys in grid
    Topic(s):
    File required:dhtmlxgrid.js
  • mode - true/false
  • enableLightMouseNavigation(mode)
    enable/disable light mouse navigation mode (row selection with mouse over, editing with single click), mutual exclusive with enableEditEvents

    File required:dhtmlxgrid.js
  • mode - true/false
  • enableMarkedCells(fl)
    sets marked cells support to enabled or disabled state

    File required:dhtmlxgrid_markers.js
  • state - true or false
  • enableMathEditing(...) [Professional]
    enable/disable editing of math cells

    File required:dhtmlxgrid_math.js
    enableMathSerialization(...) [Professional]
    enable/disable serialization of math formulas

    File required:dhtmlxgrid_math.js
    enableMercyDrag(...) [Professional]
    enable drag without removing (copy instead of move)
    Topic(s):
    File required:dhtmlxgrid_drag.js
    enableMultiline(state)
    set multiline rows support to enabled or disabled state
    Topic(s): overal control;
    File required:dhtmlxgrid.js
  • state - true or false
  • enableMultiselect(state)
    set multiselect mode to enabled or disabled state
    Topic(s): overal control;
    File required:dhtmlxgrid.js
  • state - true or false
  • enableOrderSaving(...) [Professional]
    enable automatic column order saving to cookie
    Topic(s):
    File required:dhtmlxgrid_ssc.js
    enablePaging(...) [Professional]
    enable smart paging mode
    Topic(s):
    File required:dhtmlxgrid_pgn.js
    enablePreRendering(buffer)
    allows to pre-render rows during scrolling, make scrolling more smooth, but with small drop in overall perfomance
    Topic(s):
    File required:dhtmlxgrid_srnd.js
  • buffer - count of rows, which will be prerendered
  • enableResizing(list)
    enable/disable resizing for specified colums
    Topic(s):
    File required:dhtmlxgrid.js
  • list - list of true/false values, resizing enabled for all columns by default
  • enableRowsHover(mode, cssClass)
    enable/disable hovering row on mouse over

    File required:dhtmlxgrid.js
  • mode - true/false
  • cssClass - css class for hovering row
  • enableRowspan(...) [professional]
    enable rowspan in grid

    File required:dhtmlxgrid_rowspan.js
    enableSmartRendering(mode,buffer,reserved)
    enable smart rendering mode
    Topic(s):
    File required:dhtmlxgrid_srnd.js
  • mode - true|false - enable|disable mode
  • buffer - has sense only in dynamic loading mode, count of rows requrested from server by single operation, optional
  • enableSortingSaving(...) [Professional]
    enable automatic sorting state saving to cookie
    Topic(s):
    File required:dhtmlxgrid_ssc.js
    enableTooltips(list)
    enable/disable tooltips for specified colums
    Topic(s):
    File required:dhtmlxgrid.js
  • list - list of true/false values, tooltips enabled for all columns by default
  • enableTreeCellEdit(mode)
    enable/disable editor of tree cell ; enabled by default
    Topic(s):
    File required:dhtmlxtreegrid.js
  • mode - (boolean) true/false
  • enableTreeGridLines(...) [Professional]
    enable lines in treeGrid
    Topic(s):
    File required:dhtmlxtreegrid_lines.js
    enableUndoRedo(...) [Professional]
    enable Undo/Redo functionality in grid

    File required:dhtmlxgrid_undo.js
    expandAll(...) [Professional]
    expand all tree structure
    Topic(s):
    File required:dhtmlxtreegrid.js
    expandAllGroups(...) [Professional]
    expand all groups

    File required:dhtmlxgrid_group.js
    expandGroup(...) [Professional]
    expand group of rows

    File required:dhtmlxgrid_group.js
    filterBy(...) [Professional]
    filter grid by mask
    Topic(s):
    File required:dhtmlxgrid_filter.js
    filterByAll(...) [Professional]
    force grid filtering by registered inputs ( created by # starting shortcuts, or by makeFilter function )
    Topic(s):
    File required:dhtmlxgrid_filter.js
    filterTreeBy(...) [Professional]
    filter grid by mask
    Topic(s):
    File required:dhtmlxtreegrid_filter.js
    findCell(...) [Professional]
    find cell in grid by value

    File required:dhtmlxgrid_filter.js
    Returns:array each member of which contains array with row ID and cell index
    forEachCell(rowId, custom_code)
    execute code for each cell in a row

    File required:dhtmlxgrid.js
  • rowId - id of row where cell must be itterated
  • custom_code - function which get eXcell object as incomming argument
  • forEachRow(custom_code)
    execute code for each row in a grid

    File required:dhtmlxgrid.js
  • custom_code - function which get row id as incomming argument
  • forceFullLoading(buffer)
    force grid in dyn. srnd mode fully load itself from server side
    Topic(s):
    File required:dhtmlxgrid_srnd.js
  • buffer - how much rows grid can request from server side in one operation
  • forceLabelSelection(mode)
    affect block selection, so it will copy|paste only visible text , not values behind
    Topic(s):
    File required:dhtmlxgrid_selection.js
  • mode - true/false
  • getAllRowIds(separator)
    gets a list of all row ids in grid
    Topic(s): overal control;
    File required:dhtmlxgrid.js
  • separator - delimiter to use in list

  • Returns:list of all row ids in grid
    getAllSubItems(...) [Professional]
    get list of id of all nested rows
    Topic(s):
    File required:dhtmlxtreegrid.js
    Returns:list of id of all nested rows
    getChangedRows(...) [Professional]
    get list of IDs of changed rows
    Topic(s):
    File required:dhtmlxgrid.js
    getCheckedRows(col_ind)
    get list of Ids of all rows with checked exCell in specified column
    Topic(s):
    File required:dhtmlxgrid.js
  • col_ind - column index
  • getChildItemIdByIndex(...) [Professional]
    get id of child item at specified position
    Topic(s):
    File required:dhtmlxtreegrid.js
    Returns:id of child item at specified position
    getColIndexById(id)
    gets column index by column id
    Topic(s):
    File required:dhtmlxgrid.js
  • id - column id

  • Returns:index of the column
    getColType(cInd)
    get column type by column index
    Topic(s): colums control; cells controll;
    File required:dhtmlxgrid.js
  • cInd - column index

  • Returns:type code
    getColTypeById(cID)
    get column type by column ID
    Topic(s): colums control; cells controll;
    File required:dhtmlxgrid.js
  • cID - column id

  • Returns:type code
    getColWidth(ind)
    gets width of specified column in pixels
    Topic(s): overal control;
    File required:dhtmlxgrid.js
  • ind - column index

  • Returns:column width in pixels
    getColumnId(cin)
    gets column id of column specified by index
    Topic(s):
    File required:dhtmlxgrid.js
  • cin - column index

  • Returns:column id
    getColumnLabel(cin, ind)
    gets label of column specified by index
    Topic(s):
    File required:dhtmlxgrid.js
  • cin - column index

  • Returns:column label
    getColumnsNum()
    gets number of columns in grid
    Topic(s): overal control;
    File required:dhtmlxgrid.js
    Returns:number of columns in grid
    getCombo(col_ind)
    gets Combo object of specified column. Use it to change select box value for cell before editor opened
    Topic(s): cells controll;
    File required:dhtmlxgrid.js
  • col_ind - index of the column to get combo object for
  • getCustomCombo(id, ind)
    get combobox specific for cell in question

    File required:dhtmlxgrid.js
  • id - row id
  • ind - column index
  • getItemImage(...) [Professional]
    get image of tree col
    Topic(s):
    File required:dhtmlxtreegrid.js
    getItemText(...) [Professional]
    get real caption of tree col
    Topic(s):
    File required:dhtmlxtreegrid.js
    Returns:real caption of tree col
    getLevel(rowId)
    return level of treeGrid row
    Topic(s):
    File required:dhtmlxtreegrid.js
  • rowId - id of row

  • Returns:level of treeGrid row
    getMarked()
    gets marked cells

    File required:dhtmlxgrid_markers.js
    Returns:the array of marked cells (pairs of row id and column index)
    getOpenState(...) [Professional]
    return open/close state of row
    Topic(s):
    File required:dhtmlxtreegrid.js
    Returns:open/close state of row
    getParentId(...) [Professional]
    return id of parent row
    Topic(s):
    File required:dhtmlxtreegrid.js
    Returns:id of parent row
    getRedo(...) [Professional]
    get length of available ReDo operations

    File required:dhtmlxgrid_undo.js
    getRowId(ind)
    gets row id by index
    Topic(s):
    File required:dhtmlxgrid.js
  • ind - row index

  • Returns:row id or null if there is no row with specified index
    getRowIndex(row_id)
    gets row index by id (grid only)
    Topic(s):
    File required:dhtmlxgrid.js
  • row_id - row id

  • Returns:row index or -1 if there is no row with specified id
    getRowsNum()
    returns count of row in grid ( in case of dynamic mode it will return expected count of rows )

    File required:dhtmlxgrid.js
    Returns:count of rows in grid
    getSelectedCellIndex()
    gets index of selected cell
    Topic(s): cells controll;
    File required:dhtmlxgrid.js
    Returns:index of selected cell or -1 if there is no selected sell
    getSelectedRowId()
    gets selected row id
    Topic(s): rows control; treegrid;
    File required:dhtmlxgrid.js
    Returns:id of selected row (list of ids with default delimiter) or null if non row selected
    getSortingState()
    get sorting state of grid
    Topic(s):
    File required:dhtmlxgrid.js
    Returns:array, first element is index of sortef column, second - direction of sorting ("asc" or "des").
    getStateOfView()
    returns details about current grid state

    File required:dhtmlxgrid.js
    getSubItems(...) [Professional]
    return list of child row id, sparated by comma
    Topic(s):
    File required:dhtmlxtreegrid.js
    Returns:list of child rows
    getUndo(...) [Professional]
    get length of available UnDo operations

    File required:dhtmlxgrid_undo.js
    getUserData(row_id, name)
    gets user Data
    Topic(s): data manipulation;
    File required:dhtmlxgrid.js
  • row_id - row id. if empty then user data is for grid (not row)
  • name - name of user data

  • Returns:value of user data
    gridFromClipboard(...) [Professional]
    init grid from CSV stored in clipboard
    Topic(s):
    File required:dhtmlxgrid_nxml.js
    gridToClipboard(...) [Professional]
    copy grid in CSV to clipboard
    Topic(s):
    File required:dhtmlxgrid_nxml.js
    gridToGrid(rowId,sgrid,tgrid)
    redefine this method in your code to define how grid row values should be used in another grid
    Topic(s):
    File required:dhtmlxgrid_drag.js
  • rowId - id of draged row
  • sgrid - source grid object
  • tgrid - target grid object

  • Returns:array of values for cells in target grid row
    gridToTreeElement(...) [Professional]
    redefine this method in your code to define how grid row values should be used in tree (using input parameters you can change id of new tree node, set label, set userdata blocks etc.).
    Topic(s):
    File required:dhtmlxgrid_drag.js
    Returns:if true, then grid row will be moved to tree, else - copied
    groupBy(...) [Professional]
    group grid content by values of specified column

    File required:dhtmlxgrid_group.js
    hasChildren(...) [Professional]
    return children count
    Topic(s):
    File required:dhtmlxtreegrid.js
    Returns:children count
    hidePivot(cont)
    hide pivot table related to grid, if any exists, switch grid back to normal mode
    Topic(s):
    File required:dhtmlxgrid_pivot.js
    init(fl)
    initialize grid
    Topic(s): overal control;
    File required:dhtmlxgrid.js
  • fl - if to parse on page xml data island
  • insertColumn(...) [Professional]
    add new column to the grid. Can be used after grid was initialized. At least one column should be in grid
    Topic(s):
    File required:dhtmlxgrid_mcol.js
    isColumnHidden(...) [Professional]
    get show/hidden status of column

    File required:dhtmlxgrid.js
    Returns:if column hidden then true else false
    load(url, call, type)
    load data from external file ( xml, json, jsarray, csv )

    File required:dhtmlxgrid.js
  • url - url to external file
  • call - after loading callback function, optional, can be ommited
  • type - type of data (xml,csv,json,jsarray) , optional, xml by default
  • loadCSVFile(...) [Professional]
    load grid from CSV file
    Topic(s):
    File required:dhtmlxgrid_nxml.js
    loadCSVString(...) [Professional]
    load grid from CSV string
    Topic(s):
    File required:dhtmlxgrid_nxml.js
    loadHiddenColumnsFromCookie(...) [Professional]
    load sorting order from cookie
    Topic(s):
    File required:dhtmlxgrid_ssc.js
    loadOpenStates(...) [Professional]
    load open state of TreeGrid in cookie
    Topic(s):
    File required:dhtmlxgrid_ssc.js
    loadOrderFromCookie(...) [Professional]
    load sorting order from cookie
    Topic(s):
    File required:dhtmlxgrid_ssc.js
    loadSizeFromCookie(...) [Professional]
    load grid layout from cookie
    Topic(s):
    File required:dhtmlxgrid_ssc.js
    loadSortingFromCookie(...) [Professional]
    load sorting order from cookie
    Topic(s):
    File required:dhtmlxgrid_ssc.js
    lockRow(rowId, mode)
    lock/unlock row for editing
    Topic(s):
    File required:dhtmlxgrid.js
  • rowId - id of row
  • mode - true/false - lock/unlock
  • makeFilter(...) [Professional]
    create a filter from any input element (text filter), select (dropdown) or DIV (combobox based on dhtmlxCombo)
    Topic(s):
    File required:dhtmlxgrid_filter.js
    makePivot(cont,details)
    show pivot table based on grid
    Topic(s):
    File required:dhtmlxgrid_pivot.js
  • cont - html container in which pivot rendered, but default pivot will be rendered over existing grid
  • makeSearch(...) [Professional]
    create a search box (set selection to the row with found value) from any input
    Topic(s):
    File required:dhtmlxgrid_filter.js
    mark(rid,cindex,fl)
    sets selection or removes selection from specified cell

    File required:dhtmlxgrid_markers.js
  • r - row object or row index
  • cInd - cell index
  • state - true or false
  • moveColumn(...) [Professional]
    moves column of specified index to new position
    Topic(s):
    File required:dhtmlxgrid_mcol.js
    moveRow(...) [Professional]
    move row
    Topic(s):
    File required:dhtmlxgrid_drag.js
    moveRowDown(row_id)
    moves row one position down if possible
    Topic(s):
    File required:dhtmlxgrid.js
  • row_id - row id
  • moveRowTo(...) [Professional]
    move row
    Topic(s):
    File required:dhtmlxgrid_drag.js
    Returns:moved item ID
    moveRowUp(row_id)
    moves row one position up if possible
    Topic(s):
    File required:dhtmlxgrid.js
  • row_id - row id
  • openItem(...) [Professional]
    expand row
    Topic(s):
    File required:dhtmlxtreegrid.js
    parse(data, call, type)
    load data from local datasource ( xml string, csv string, xml island, xml object, json objecs , javascript array )

    File required:dhtmlxgrid.js
  • data - string or object
  • type - data type (xml,json,jsarray,csv), optional, data threated as xml by default
  • pasteBlockFromClipboard()
    paste content of clipboard into block selection of grid
    Topic(s):
    File required:dhtmlxgrid_selection.js
    preventIECaching(mode)
    prevent caching in IE by adding random values to URL string
    Topic(s): treegrid;
    File required:dhtmlxgrid.js
  • mode - enable/disable random values in URLs ( disabled by default )
  • printView(...) [Professional]
    generate print friendly view
    Topic(s):
    File required:dhtmlxgrid_nxml.js
    refreshFilters(...) [Professional]
    refresh filtering ( can be used if data in grid changed and filters need to be updated )
    Topic(s):
    File required:dhtmlxgrid_filter.js
    rowToClipboard(...) [Professional]
    copy value of row to clipboard
    Topic(s):
    File required:dhtmlxgrid_nxml.js
    rowToDragElement(gridRowId)
    redefine this method in your code to define how grid row values should be displaied while draging
    Topic(s):
    File required:dhtmlxgrid_drag.js
  • gridRowId - id of grid row

  • Returns:html string representing dragging row
    saveHiddenColumnsToCookie(...) [Professional]
    save hidden columns to cookie
    Topic(s):
    File required:dhtmlxgrid_ssc.js
    saveOpenStates(...) [Professional]
    store opene state of TreeGrid in cookie
    Topic(s):
    File required:dhtmlxgrid_ssc.js
    saveOrderToCookie(...) [Professional]
    save sorting order to cookie
    Topic(s):
    File required:dhtmlxgrid_ssc.js
    saveSizeToCookie(...) [Professional]
    save grid layout to cookie
    Topic(s):
    File required:dhtmlxgrid_ssc.js
    saveSortingToCookie(...) [Professional]
    save sorting order to cookie
    Topic(s):
    File required:dhtmlxgrid_ssc.js
    selectAll()
    select all rows in grid, it doesn't fire any events
    Topic(s): cells controll;
    File required:dhtmlxgrid.js
  • edit - switch selected cell to edit mode
  • selectCell(r, cInd, fl, preserve, edit, show)
    set selection to specified row-cell
    Topic(s): cells controll;
    File required:dhtmlxgrid.js
  • r - row object or row index
  • cInd - cell index
  • [fl] - true if to call onRowSelect function
  • preserve - preserve previously selected rows true/false (false by default)
  • edit - switch selected cell to edit mode
  • show - true/false - scroll row to view, true by defaul
  • selectRow(r, fl, preserve, show)
    selects row (and first cell of it)
    Topic(s): rows control;
    File required:dhtmlxgrid.js
  • r - row index or row object
  • fl - if true, then call function on select
  • preserve - preserve previously selected rows true/false (false by default)
  • show - true/false - scroll row to view, true by defaul
  • selectRowById(row_id, multiFL, show, call)
    selects row by ID
    Topic(s): rows control;
    File required:dhtmlxgrid.js
  • row_id - row id
  • multiFL - VOID. select multiple rows
  • show - true/false - scroll row to view, true by defaul
  • call - true to call function on select
  • serialize(...) [Professional]
    get actual xml of grid. The depth of serialization can be set with setSerializationLevel method
    Topic(s): overal control;
    File required:dhtmlxgrid.js
    serializeToCSV(...) [Professional]
    serialize to CSV string
    Topic(s):
    File required:dhtmlxgrid_nxml.js
    setAwaitedRowHeight(height)
    set height which will be used in smart rendering mode for row calculation, function need to be used if you use custom skin for grid which changes default row height
    Topic(s):
    File required:dhtmlxgrid_srnd.js
  • {int} height - awaited height of row

  • Returns:void
    setCSVDelimiter(...) [Professional]
    load grid from CSV string
    Topic(s):
    File required:dhtmlxgrid_nxml.js
    setCellExcellType(...) [Professional]
    set excell type for cell in question

    File required:dhtmlxgrid.js
    setCellTextStyle(row_id, ind, styleString)
    sets style to cell
    Topic(s): appearence control;
    File required:dhtmlxgrid.js
  • row_id - row id
  • ind - cell index
  • styleString - style string in common format (exmpl: "color:red;border:1px solid gray;")
  • setColAlign(alStr)
    set align of values in columns
    Topic(s): colums control;
    File required:dhtmlxgrid.js
  • alStr - list of align values (possible values are: right,left,center,justify). Default delimiter is ","
  • setColSorting(sortStr)
    set column sort types (avaialble: str, int, date, na or function object for custom sorting)
    Topic(s): colums control; cells controll;
    File required:dhtmlxgrid.js
  • sortStr - sort codes list with default delimiter
  • setColTypes(typeStr)
    set column types
    Topic(s): colums control; cells controll;
    File required:dhtmlxgrid.js
  • typeStr - type codes list (default delimiter is ",")
  • setColVAlign(valStr)
    set vertical align of columns
    Topic(s): colums control;
    File required:dhtmlxgrid.js
  • valStr - vertical align values list for columns (possible values are: baseline,sub,super,top,text-top,middle,bottom,text-bottom)
  • setColWidth(ind, value)
    sets width of specified column in pixels (soen't works with procent based grid)
    Topic(s): overal control;
    File required:dhtmlxgrid.js
  • ind - column index
  • value - new width value
  • setColspan(...) [Professional]
    dynamicaly set colspan in row starting from specified column index
    Topic(s): treegrid;
    File required:dhtmlxgrid.js
    setColumnColor(clr)
    colorize columns background.
    Topic(s): appearence control;
    File required:dhtmlxgrid.js
  • clr - colors list
  • setColumnExcellType(...) [Professional]
    set excell type for all cells in specified column

    File required:dhtmlxgrid.js
    setColumnHidden(...) [Professional]
    hide/show column

    File required:dhtmlxgrid.js
    setColumnId(ind, id)
    sets ids to specified column.
    Topic(s):
    File required:dhtmlxgrid.js
  • ind- index of column
  • id- id of column
  • setColumnIds(ids)
    sets ids to every column. Can be used then to retreive the index of the desired colum
    Topic(s):
    File required:dhtmlxgrid.js
  • [ids] - delimitered list of ids (default delimiter is ","), or empty if to use values set earlier
  • setColumnLabel(c, label, ind)
    sets new column header label
    Topic(s): appearence control;
    File required:dhtmlxgrid.js
  • col - header column index
  • label - new label for the cpecified header's column. Can contai img:[imageUrl]Text Label
  • ind - header row index (default is 0)
  • setColumnMinWidth(width, ind)
    set minimum column width ( works only for manual resizing )
    Topic(s):
    File required:dhtmlxgrid.js
  • width - minimum column width, can be set for specified column, or as comma separated list for all columns
  • ind - column index
  • setColumnsVisibility(...) [Professional]
    set list of visible/hidden columns
    Topic(s): initialization;
    File required:dhtmlxgrid.js
    setCustomSorting(...) [Professional]
    set custom sorting (custom sort has three params - valueA,valueB,order; where order can be asc or des)
    Topic(s):
    File required:dhtmlxgrid.js
    setDateFormat(...) [Professional]
    set mask for date formatting in cell
    Topic(s):
    File required:dhtmlxgrid.js
    setDelimiter(delim)
    set delimiter character used in list values (default is ",")
    Topic(s):
    File required:dhtmlxgrid.js
  • delim - delimiter as string
  • setDragBehavior(mode)
    set Drag-And-Drop behavior (child - drop as chils, sibling - drop as sibling
    Topic(s):
    File required:dhtmlxgrid_drag.js
  • mode - behavior name (child,sibling,complex)
  • setDragText(single,plural)
    define text (single and plural forms) for extended visual appearence of drag-n-drop

    File required:dhtmlx_extdrag.js
  • single - single form (like "product")
  • plural - plural form (if omitted, then "s" will be added to single form)
  • setEditable(fl)
    manage editibility of the grid
    Topic(s):
    File required:dhtmlxgrid.js
  • [fl] - set not editable if FALSE, set editable otherwise
  • setExternalTabOrder(start, end)
    sets elements which get focus when tab is pressed in the last or first (tab+shift) cell

    File required:dhtmlxgrid.js
  • start - html object or its id - gets focus when tab+shift are pressed in the first cell
  • end - html object or its id - gets focus when tab is pressed in the last cell
  • setFiltrationLevel(...) [Professional]
    allows to define , which level of tree must be used for filtering
    Topic(s):
    File required:dhtmlxtreegrid_filter.js
    setHeader(hdrStr, splitSign, styles)
    set header label and default params for new headers
    Topic(s): colums control;
    File required:dhtmlxgrid.js
  • hdrStr - header string with delimiters
  • splitSign - string used as a split marker, optional. Default is "#cspan"
  • styles - array of header styles
  • setIconPath(path)
    set path to external images used in grid ( tree and img column types )
    Topic(s): overal control;
    File required:dhtmlxgrid.js
  • path - url (or relative path) of images folder with closing "/"
  • setImagePath(path)
    set path to grid internal images (sort direction, any images used in editors, checkbox, radiobutton)
    Topic(s): overal control;
    File required:dhtmlxgrid.js
  • path - url (or relative path) of images folder with closing "/"
  • setImageSize(...) [Professional]
    set size of treegrid images
    Topic(s):
    File required:dhtmlxtreegrid.js
    setInitWidths(wp)
    set width of columns in pixels
    Topic(s): overal control;
    File required:dhtmlxgrid.js
  • wp - list of column width in pixels
  • setInitWidthsP(wp)
    set width of columns in percents
    Topic(s): overal control;
    File required:dhtmlxgrid.js
  • wp - list of column width in percents
  • setItemCloseable(...) [Professional]
    enable/disable closing of row
    Topic(s):
    File required:dhtmlxtreegrid.js
    setItemImage(...) [Professional]
    set image of tree col
    Topic(s):
    File required:dhtmlxtreegrid.js
    setItemText(...) [Professional]
    set real caption of tree col
    Topic(s):
    File required:dhtmlxtreegrid.js
    setMathRound(...) [Professional]
    enable/disable rounding while math calculations

    File required:dhtmlxgrid_math.js
    setNoHeader(fl)
    create grid with no header. Call before initialization, but after setHeader. setHeader have to be called in any way as it defines number of columns
    Topic(s): overal control;
    File required:dhtmlxgrid.js
  • fl - true to use no header in the grid
  • setNumberFormat(...) [Professional]
    set mask for formatting numeric data ( works for [ed/ro]n excell only or oher cell types with suport for this method)
    Topic(s):
    File required:dhtmlxgrid.js
    setOnOpenEndHandler(func)
    set function called after tree node opened/closed

    EventName:onOpenEnd
    Event raised immideatly after item in tree got command to open/close , and before item was opened//closed. Event also raised for unclosable nodes and nodes without open/close functionality - in that case result of function will be ignored.
  • ID of node which will be opened/closed
  • Current open state of tree item. -1 - item closed, 1 - item opened.
  • Topic(s): event handlers;
    File required:dhtmlxtreegrid.js
  • func - event handling function
  • setOnOpenStartHandler(func)
    set function called before tree node opened/closed

    EventName:onOpenStart
    Event raised immideatly after item in tree got command to open/close , and before item was opened//closed. Event also raised for unclosable nodes and nodes without open/close functionality - in that case result of function will be ignored.
  • ID of node which will be opened/closed
  • Current open state of tree item. -1 - item closed, 1 - item opened.

  • Event returns:true - confirm opening/closing; false - deny opening/closing;
    Topic(s): event handlers;
    File required:dhtmlxtreegrid.js
  • func - event handling function
  • setPagingSkin(name)
    allows to set custom paging skin

    File required:dhtmlxgrid_pgn.js
  • name - skin name (default,toolbar,bricks)
  • setPagingTemplates(a,b)
    allows to set paging templates for default skin

    File required:dhtmlxgrid_pgn.js
  • a - template for zone A
  • b - template for zone B
  • setPagingWTMode(...) [Professional]
    configure paging with toolbar mode ( must be called BEFORE enablePaging)

    File required:dhtmlxgrid_pgn.js
    setRowColor(row_id, color)
    sets background color of row (via bgcolor attribute)
    Topic(s): appearence control;
    File required:dhtmlxgrid.js
  • row_id - row id
  • color - color value
  • setRowExcellType(...) [Professional]
    set excell type for all cells in specified row

    File required:dhtmlxgrid.js
    setRowHidden(id, state)
    hide/show row (warning! - this command doesn't affect row indexes, only visual appearance)

    File required:dhtmlxgrid.js
  • ind - column index
  • state - true/false - hide/show row
  • setRowId(ind, row_id)
    sets new id for row by its index
    Topic(s):
    File required:dhtmlxgrid.js
  • ind - row index
  • row_id - new row id
  • setRowTextBold(row_id)
    sets row text BOLD
    Topic(s): appearence control;
    File required:dhtmlxgrid.js
  • row_id - row id
  • setRowTextNormal(row_id)
    sets row text weight to normal
    Topic(s): appearence control;
    File required:dhtmlxgrid.js
  • row_id - row id
  • setRowTextStyle(row_id, styleString)
    sets style to row
    Topic(s): appearence control;
    File required:dhtmlxgrid.js
  • row_id - row id
  • styleString - style string in common format (exmpl: "color:red;border:1px solid gray;")
  • setRowspan(...) [professional]
    set rowspan with specified length starting from specified cell

    File required:dhtmlxgrid_rowspan.js
    setScrollbarWidthCorrection(width)
    set width of browser scrollbars, will be used to correct autoWidth calculations (by default grid uses 16 for IE and 19 pixels for FF)
    Topic(s):
    File required:dhtmlxgrid.js
  • width - scrollbar width
  • setSerializableColumns(...) [Professional]
    configure which column must be serialized (if you do not use this method, then all columns will be serialized)
    Topic(s): data manipulation; overal control;
    File required:dhtmlxgrid.js
    setSerializationLevel(...) [Professional]
    configure XML serialization
    Topic(s): data manipulation; overal control;
    File required:dhtmlxgrid.js
    setSkin(name)
    set one of predefined css styles (xp, mt, gray, light, clear, modern)
    Topic(s): appearence control;
    File required:dhtmlxgrid.js
  • name - style name
  • setSortImgState(state, ind, order, row)
    sets position and visibility of sort arrow
    Topic(s):
    File required:dhtmlxgrid.js
  • state - true/false - show/hide image
  • ind - index of field
  • order - asc/desc - type of image
  • row - one based index of header row ( used in multirow headers, top row by default )
  • setStyle(ss_header, ss_grid, ss_selCell, ss_selRow)
    modify default style of grid and its elements. Call before or after Init
    Topic(s): appearence control;
    File required:dhtmlxgrid.js
  • ss_header - style def. expression for header
  • ss_grid - style def. expression for grid cells
  • ss_selCell - style def. expression for selected cell
  • ss_selRow - style def. expression for selected Row
  • setTabOrder(order)
    set tab order of columns

    File required:dhtmlxgrid.js
  • order - list of tab indexes (default delimiter is ",")
  • setUserData(row_id, name, value)
    sets user data to row
    Topic(s): data manipulation;
    File required:dhtmlxgrid.js
  • row_id - row id. if empty then user data is set for grid (not row)
  • name - name of user data block
  • value - value of user data block
  • setXMLAutoLoading(...) [Professional]
    allow to configure settings of dynamical paging
    Topic(s):
    File required:dhtmlxgrid_pgn.js
    showRow(rowID)
    scrolls row to the visible area
    Topic(s): overal control;
    File required:dhtmlxgrid.js
  • rowID - row id
  • sortRows(col, type, order)
    sort grid

    File required:dhtmlxgrid.js
  • col - index of column, by which grid need to be sorted
  • type - sorting type (str,int,date), optional, by default sorting type taken from column setting
  • order - sorting order (asc,des), optional, by default sorting order based on previous sorting operation
  • sortTreeRows(...) [Professional]
    sorts treegrid by specified column
    Topic(s): colums control; data manipulation; treegrid;
    File required:dhtmlxtreegrid.js
    startFastOperations()
    start fast operation mode, in such mode events are not generated, some time consuming actions applied only once, which allow to increase performance
    Topic(s):
    File required:dhtmlxgrid_fast.js
    stopFastOperations()
    turn off fast operation mode, need to be executed to normalize view.
    Topic(s):
    File required:dhtmlxgrid_fast.js
    submitAddedRows(mode)
    include additional data with info about which rows was added and which deleted, enabled by default
    Topic(s):
    File required:dhtmlxgrid_form.js
  • mode - {boolean} enable|disable mode
  • submitOnlyChanged(mode)
    include only changed rows in form submit
    Topic(s):
    File required:dhtmlxgrid_form.js
  • mode - {boolean} enable|disable mode
  • submitOnlyRowID(mode)
    include only row's IDS in form submit
    Topic(s):
    File required:dhtmlxgrid_form.js
  • mode - {boolean} enable|disable mode
  • submitOnlySelected(mode)
    include only selected rows in form submit
    Topic(s):
    File required:dhtmlxgrid_form.js
  • mode - {boolean} enable|disable mode
  • submitSerialization(mode)
    include serialized grid as part of form submit
    Topic(s):
    File required:dhtmlxgrid_form.js
  • mode - {boolean} enable|disable mode
  • treeToGridElement(...) [Professional]
    redefine this method in your code to define how tree node values should be used in grid (using input parameters you can change id of new row, values for cells, userdata blocks etc.).
    Topic(s):
    File required:dhtmlxgrid_drag.js
    Returns:if true, then tree node should be moved to grid, else - copied
    uid()
    returns unique ID

    File required:dhtmlxgrid.js
    unmarkAll()
    removes selection from all marked cell

    File required:dhtmlxgrid_markers.js
    updateCellFromClipboard(...) [Professional]
    set value of cell from clipboard
    Topic(s):
    File required:dhtmlxgrid_nxml.js
    updateFromXML(url, insert_new, del_missed, afterCall)
    refresh grid from XML ( doesnt work for buffering, tree grid or rows in smart rendering mode )

    File required:dhtmlxgrid.js
  • insert_new - insert new items
  • del_missed - delete missed rows
  • afterCall - function, will be executed after refresh completted
  • updateRowFromClipboard(...) [Professional]
    set value of row from clipboard
    Topic(s):
    File required:dhtmlxgrid_nxml.js

    eXcell object API

    eXcell_ed object API

    eXcell_edtxt object API

    eXcell_edn object API

    eXcell_ch object API

    eXcell_ra object API

    eXcell_txt object API

    eXcell_txttxt object API

    eXcell_co object API

    eXcell_coro object API

    eXcell_cp object API

    eXcell_img object API

    eXcell_price object API

    eXcell_dyn object API

    eXcell_ro object API

    eXcell_rotxt object API

    eXcell_tree object API

    getLabel(val)
    sets text representation of cell ( setLabel doesn't triger math calculations as setValue do)

    File required:dhtmlxtreegrid.js
  • val - new value
  • setLabel(val)
    sets text representation of cell ( setLabel doesn't triger math calculations as setValue do)

    File required:dhtmlxtreegrid.js
  • val - new value